<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<style type="text/css">
.qimeng_login_huitie {display: block;border: 1px solid #ced4da;border-radius: 0.25rem;width: 100% !important;color: #84878a;}
.qimeng_login_huitie_hr_1 {margin-bottom: 1.8rem;}
.qimeng_login_huitie_hr_2 {margin-top: 1.5rem; margin-right: 6.5rem; margin-bottom: 1.5rem; margin-left: 3.85rem;}
.qimeng_login_huitie_hr_3 {margin-bottom: 0.3rem; width: 795px; height: 309px; border: 1px solid #e0e1e2;}
textarea {
  display: block;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: 22px;
  padding-left: 5px;
}
</style>
<div class="row">
	<div class="col-lg-12">
		<div class="card">
			<div class="card-body">
				<form action="<?php echo url("plugin-setting-qimeng_login_huitie");?>" method="post" id="form">
				<h4 class="card-title mb-3">游客引导回帖框设置</h4>
                  <hr class="qimeng_login_huitie_hr_1" />
                <!-- QiMeng_样式图 -->
				<div class="form-group row"> 
				<label class="col-md-2 form-control-label text-md-right pr-0">样式图：</label>
			    <div class="col-sm-9">
                <img src="/plugin/qimeng_login_huitie/images/icon.png" class="qimeng_login_huitie_hr_3">		
		        </div>
	            </div>	
                <!-- QiMeng_回帖登录引导语 -->
				<hr class="qimeng_login_huitie_hr_2" />
				<div class="form-group row"> 
				<label class="col-md-2 form-control-label text-md-right pr-0">引导文案：</label>
			    <div class="col-sm-9">
                <textarea name="qimeng_login_huitie_name_htm" class="qimeng_login_huitie" style="height: 28px; resize: none;" placeholder="如：您需要登录后才可以回帖"><?php echo $setting['qimeng_login_huitie_name_htm'];?></textarea>			
		        </div>
	            </div>
				
                <!-- QiMeng_登录设置 -->
				<hr class="qimeng_login_huitie_hr_2" />
				<div class="form-group row"> 
				<label class="col-md-2 form-control-label text-md-right pr-0">登录名称：</label>
			    <div class="col-sm-9">
                <textarea name="qimeng_login_huitie_name_1_htm" class="qimeng_login_huitie" style="height: 28px; resize: none;" placeholder="如：立即登录"><?php echo $setting['qimeng_login_huitie_name_1_htm'];?></textarea>			
		        </div>
	            </div>
					
                <!-- QiMeng_注册设置 -->
				<hr class="qimeng_login_huitie_hr_2" />
				<div class="form-group row"> 
				<label class="col-md-2 form-control-label text-md-right pr-0">注册名称：</label>
			    <div class="col-sm-9">
                <textarea name="qimeng_login_huitie_name_2_htm" class="qimeng_login_huitie" style="height: 28px; resize: none;" placeholder="如：立即注册"><?php echo $setting['qimeng_login_huitie_name_2_htm'];?></textarea>			
		        </div>
	            </div>
				
				<!-- QiMeng_QQ登录设置 -->
				<hr class="qimeng_login_huitie_hr_2" />
				<div class="form-group row"> 
				<label class="col-md-2 form-control-label text-md-right pr-0">QQ登录名称：</label>
			    <div class="col-sm-9">
                <textarea name="qimeng_login_huitie_name_3_htm" class="qimeng_login_huitie" style="height: 28px; resize: none;" placeholder="如：QQ登录"><?php echo $setting['qimeng_login_huitie_name_3_htm'];?></textarea>			
		        </div>
	            </div>
					
					<div class="form-group row">
						<label class="col-sm-2 form-control-label"></label>
						<div class="col-sm-9">
							<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
							<a role="button" class="btn btn-secondary btn-block mt-3" href="javascript:history.back();"><?php echo lang('back');?></a>
						</div>
					</div>
				</form>
  </div>
</div>
</div>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>
<script>
var jform = $("#form");
var jsubmit = $("#submit");
  
var referer = '<?php echo http_referer();?>';
jform.on('submit', function(){
	jform.reset();
	jsubmit.button('loading');

	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
            jsubmit.text(message).delay(2000).location();
			//jsubmit.text(message).delay(2000).button('reset').location(referer);
			return;
		} else {
			$.alert(message);
			jsubmit.button('reset');
		}
	});
	return false;
});
  
  // 禁止回车换行
  document.onkeydown=function(e){
    if(e.keyCode == 13 && e.ctrlKey){
        document.getElementById("line").value += "\n";
    }else if(e.keyCode == 13){
        e.preventDefault();
    }
}
</script>